﻿//checked
namespace net.entity.framework.query {
    public class Eql {
        public static QueryBuilder.BuilderBottom Select(params QueryRoot[] selectRoots) {
            return new QueryBuilder.BuilderBottom(false, -1, selectRoots);
        }

        public static QueryBuilder.BuilderBottom SelectTop(int top, QueryRoot[] selectRoots) {
            return new QueryBuilder.BuilderBottom(false, top, selectRoots);
        }

        public static QueryBuilder.BuilderBottom SelectDistinct(QueryRoot[] selectRoots) {
            return new QueryBuilder.BuilderBottom(true, -1, selectRoots);
        }

        public static QueryBuilder.BuilderBottom SelectDistinct(int top, QueryRoot[] selectRoots) {
            return new QueryBuilder.BuilderBottom(true, top, selectRoots);
        }

        public static DeleteBuilder.BuilderBottom Delete(QueryRoot deleteRoot) {
            return new DeleteBuilder.BuilderBottom(deleteRoot);
        }

        //public static DeleteBuilder.BuilderBottom Update() {
        //    return new DeleteBuilder.BuilderBottom();
        //}

        public static EqlStar Star {
            get { return EqlStar.Create(); }
        }
    }
}